Previous Thread
Next Thread
Print Thread
Rate Thread
#101068 04/09/2000 8:48 AM
Joined: Mar 2000
Posts: 3
Member
Member
Offline
Joined: Mar 2000
Posts: 3
I want to add a extra line to a html file. At this moment I can add one line. But when a new line is added the old one it removed.

Does anyone have some code that could do this.

Sponsored Links
#101069 04/10/2000 7:46 PM
Joined: Jun 2000
Posts: 13
Junior Member
Junior Member
Offline
Joined: Jun 2000
Posts: 13
Where exactly did you want to add this line in the HTML file??

------------------
Mike(mickalo)Blezien
Thunder Rain Internet Publishing
Providing Personal/Business
Internet Solutions that work!
http://www.thunder-rain.com
Email: info@thunder-rain.com

#101070 04/11/2000 6:28 AM
Joined: Mar 2000
Posts: 3
Member
Member
Offline
Joined: Mar 2000
Posts: 3
Well right about in the middle. But I don't want to replace the lines above it each time.

The document should be left as it is only with a extra line.

BooTeK

#101071 04/11/2000 7:45 AM
Joined: Jun 2000
Posts: 13
Junior Member
Junior Member
Offline
Joined: Jun 2000
Posts: 13
One way would be something like this:
code:
#############################################
# Define path to file
$HTML_file = "/path/to/HTML_file";

# Open HTML file to print output
open(FILE,"<$HTML_file") | | die "Can't open $HTML_file file";
@lines = ;
close(FILE);
foreach $line (@lines) {
# Insert the marker in the HTML # page where you whant the
# new line printed in the file.
if ($line =~ //) {
print qq|the line you want here|;
exit;
}
else { chop ($line) if ($line =~ /n$/); print "$linen"; }
}
######################################

Hope this helps [Linked Image]

------------------
Mike(mickalo)Blezien
Thunder Rain Internet Publishing
Providing Personal/Business
Internet Solutions that work!
http://www.thunder-rain.com
Email: info@thunder-rain.com

#101072 04/13/2000 6:36 AM
Joined: Mar 2000
Posts: 3
Member
Member
Offline
Joined: Mar 2000
Posts: 3
Thanks man this helped a lot.

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 2658
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 24
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)